package com.yxc.testproject.entity;

import com.yxc.testproject.const_enum.SexEnum;
import com.yxc.translationdemo.annotation.Translation;
import com.yxc.translationdemo.entity.Translated;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.FieldNameConstants;

/**
 * @author: YXC
 * @time: 2023/4/23 15:59
 **/
@Data
@FieldNameConstants
@AllArgsConstructor
@NoArgsConstructor
public class People implements Translated {

    private String name;

    @Translation(fieldName = Fields.sexTrans, dataSource = SexEnum.class)
    private Integer sex;

    private String sexTrans;

    public static void main(String[] args) {
        People people = new People("yyy", 1, null);
        people.translate();
        System.out.println(people);
    }

}
